﻿<Window x:Class="SSLVerifier.Views.Windows.About"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="{Binding RelativeSource={RelativeSource Self}, Mode=OneTime, Path=ProductTitle}" 
    x:Uid="idAboutBox"
    Style="{DynamicResource AboutDialogStyle}" WindowStartupLocation="CenterOwner">
    <Window.Resources>
        <!--<Image x:Key="AboutLogo" Height="96" Width="96" Source="/Views/Images/logo.png" />-->
        <Style x:Key="AboutDialogStyle" TargetType="Window">
            <Setter Property="Height" Value="Auto" />
            <Setter Property="Width" Value="500" />
            <Setter Property="ShowInTaskbar" Value="False" />
            <Setter Property="ResizeMode" Value="NoResize" />
            <Setter Property="WindowStyle" Value="SingleBorderWindow" />
            <Setter Property="SizeToContent" Value="Height" />
        </Style>
        <Style x:Key="DisplayAreaStyle" TargetType="{x:Type StackPanel}">
            <Setter Property="Margin" Value="10,10,10,5" />
        </Style>
        <Style x:Key="BackgroundStyle" TargetType="{x:Type StackPanel}">
            <Setter Property="Background">
                <Setter.Value>
                    <LinearGradientBrush EndPoint="0,1">
                        <GradientStop Offset="0" Color="LightBlue" />
                        <GradientStop Offset="0.55" Color="White" />
                        <GradientStop Offset="0.85" Color="White" />
                        <GradientStop Offset="1" Color="LightBlue" />
                    </LinearGradientBrush>
                </Setter.Value>
            </Setter>
        </Style>
        <Style TargetType="Label">
            <Setter Property="Padding" Value="0" />
        </Style>
        <Style x:Key="ParagraphSeparator" TargetType="{x:Type Label}">
            <Setter Property="Padding" Value="0,10,0,0" />
        </Style>
        <Style x:Key="LinkLabelStyle">
            <Setter Property="Control.Padding" Value="0" />
            <Setter Property="Control.VerticalAlignment" Value="Center" />
        </Style>
        <Style x:Key="ReadOnlyDescStyle" TargetType="{x:Type TextBox}">
            <Setter Property="MinLines" Value="6" />
            <Setter Property="MaxLines" Value="6" />
            <Setter Property="IsReadOnly" Value="True" />
            <Setter Property="TextWrapping" Value="WrapWithOverflow" />
            <Setter Property="VerticalScrollBarVisibility" Value="Visible" />
        </Style>
    </Window.Resources>
    <StackPanel x:Uid="clientArea" Style="{StaticResource BackgroundStyle}">
        <DockPanel Background="#FF2570BE">
            <!--<StaticResource ResourceKey="AboutLogo" />-->
            <TextBlock Text="SSL Certificate Verifier" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="GhostWhite" FontSize="36" FontWeight="Bold"/>
        </DockPanel>
        <StackPanel x:Uid="displayArea" Style="{StaticResource DisplayAreaStyle}" 
                    DataContext="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}, Mode=OneTime}">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <StackPanel>
                    <TextBlock x:Name="productName" x:Uid="productName" 
                               Text="{Binding Mode=OneTime, Path=Product}" />
                    <StackPanel x:Uid="versionArea" Orientation="Horizontal">
                        <TextBlock x:Name="versionLabel" x:Uid="VersionLabel" Text="Version - " />
                        <TextBlock x:Name="version" x:Uid="version" Text="{Binding Mode=OneTime, Path=Version}" />
                    </StackPanel>
                    <TextBlock x:Name="copyright" x:Uid="copyright" Text="{Binding Mode=OneTime, Path=Copyright}"  />
                    <TextBlock>
                        <Hyperlink x:Name="company"
                                   x:Uid="company"
                                   NavigateUri="https://www.pkisolutions.com"
                                   RequestNavigate="Company_OnRequestNavigate">
                            <TextBlock Text="{Binding Mode=OneTime, Path=Company}"/>
                        </Hyperlink>
                    </TextBlock>
                    <TextBlock x:Name="reserved" x:Uid="reserved" Text="All Rights Reserved." />
                </StackPanel>
                <Image Grid.Column="1"
                       Source="/Views/Images/pkisolutions_logo_small.png" Width="120"
                       Height="74"
                       VerticalAlignment="Center"/>
            </Grid>
            <Label x:Name="info" x:Uid="info" Style="{StaticResource ParagraphSeparator}" 
                   Content="Product details:" />
            <TextBox x:Name="description" x:Uid="description" Text="{Binding Mode=OneTime, Path=Description}"
                     Style="{StaticResource ReadOnlyDescStyle}" />
            <DockPanel x:Uid="buttonArea">
                <Button x:Name="okButton" x:Uid="okButton" Content="OK" MinWidth="75" DockPanel.Dock="Right" Margin="0,5" IsCancel="True" IsDefault="True" Click="OkButton_OnClick"/>
                <Label x:Name="productLink" x:Uid="productLink" Style="{StaticResource LinkLabelStyle}" >
                    <Hyperlink x:Name="hyperlink" x:Uid="hyperlink" NavigateUri="{Binding Mode=OneTime, Path=LinkUri}"  Style="{StaticResource LinkLabelStyle}"
                               RequestNavigate="HyperlinkRequestNavigate">
                        <TextBlock Text="{Binding Mode=OneTime, Path=LinkText}" />
                    </Hyperlink>
                </Label>
            </DockPanel>
        </StackPanel>
    </StackPanel>
</Window>